﻿using System.Linq;
using System.Collections.Specialized;
using iHouse.Infrastructure;
using iHouse.Common.Const;

namespace iHouse.Web.Infrastructure
{
    public class AlbumSearchFilter : SearchFilterBase
    {
        protected override void Collect(NameValueCollection contain)
        {
            if (contain.AllKeys.Contains(PagingConst.SEARCH_STRING))
            {
                this.FilterCollection.Add(BusinessConst.ALBUM_NAME_FIELD, contain[PagingConst.SEARCH_STRING].ToLower());
                this.FilterCollection.Add(BusinessConst.ALBUM_SINGER_FIELD, contain[PagingConst.SEARCH_STRING].ToLower());
            }
        }
    }
}
